import http from "@/utils/request";
import type { IRes } from '@/interface/index'

export interface IgetPackage {
    tokensTitle: string, //充值标题
    detail: null,
    price: number,   //充值金额
    amount: number, //充值量
    stock: number,
    status: number,  // 状态.1-在售 2-下架 3-删除
    applyProductId: string, //苹果支付产品ID
    createTime: string,
    updateTime: string,
    id: number
}
interface IgetPackageData extends IRes{
    data: IgetPackage[]
}
//查询充值套餐
export const getpackage = ()=>{
  return http.get<IgetPackageData>('/api/xlx-sso/account/getpackage')
}
//支付套餐-pc端支付宝二维码支付
export const alipayScanPay = (data: number)=>{
  return http.get(`/api/xlx-sso/alipay/scanPay?tokensPriceId=${data}`)
}
//支付套餐-pc端口微信二维码支付
export const wxpayNative = (data: number)=>{
  return http.get(`/api/xlx-sso/wxpay/native?tokensPriceId=${data}`)
}
//查询支付订单
export const tokensOrder = (data: number)=>{
  return http.get(`/api/xlx-sso/tokensOrder/get?orderNo=${data}`)
}